Repository navigation
aggregator: age date-only freshness stamps by the Chicago calendar day (#1629) - #3030
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1629. Queue task 4064 (repo-health-code-pilot).
freshness()inpm-stack/aggregator/src/derive.tsaged date-only stamps against the UTC calendar day, so a read dated today (Chicago) reportedageDays 1— and stale at cadence 0 — from 19:00 Chicago onward, when UTC had rolled over and Chicago had not.Fix: the date-only branch now takes "today" from the existing
chicagoYmd(now)helper (America/Chicago, the timezone every other calendar helper in the file uses) instead ofnow's UTC date. The stamp itself is a timezone-less calendar date, so the day difference is calendar-date minus calendar-date; the #1568 future-tolerance bound is unchanged in shape (more than one day past today's Chicago date = unknown age). Datetime stamps are untouched (elapsed whole days).Tests: new boundary test in
test/usage.test.ts— CDT evening (19:30 CDT = next UTC day), 23:59 CDT, and the CST-evening equivalent all report a today-dated stamp as age 0 and yesterday's as 1, with stale verdicts following cadenceDays from the Chicago-day age; tomorrow's Chicago date stays within tolerance. All pre-existing freshness tests pass unchanged.Laptop verification:
bun test test/usage.test.ts32/32; full aggregator suite 557 pass / 7 fail, the 7 being the pre-existing page-manifest/render failures also present on clean main;tsc --noEmitshows no errors in the touched files (pre-existing test-file errors elsewhere unchanged).🤖 Queue worker lane E, task 4064.
Need help on this PR? Tag
@codesmith-botwith what you need.